import HTTP from '@/http/http'
const centerApi = import.meta.env.VITE_BASE_URL
class Api extends HTTP {
  // 查询市级信息
  getCityList(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/area/getCityList`,
      params
    })
  }
  // 查询县区级信息
  getCountyList(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/area/getCountyList`,
      params
    })
  }
  // 根据区县或灾害类型查询灾害点列表
  disasterPointList(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/disaster/disasterPointList`,
      params
    })
  }
  // 灾害点Top20列表
  disasterTop20(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/disaster/disasterTop20`,
      params
    })
  }
  // 获得灾害类型列表
  disasterTypeList(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/disaster/disasterTypeList`,
      params
    })
  }
  // 统计各灾害类型占比
  disasterTypeProportionStatistics(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/disaster/disasterTypeProportionStatistics`,
      params
    })
  }
  // 获取灾害点的详情
  getDisasterDetail(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/disaster/getDisasterDetail`,
      params
    })
  }
  // 获得灾害点降水24小时内逐小时短期预报曲线趋势图
  getElementHourCurve(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}​/disaster​/getElementHourCurve`,
      params
    })
  }
  // 轮询查询当天最新地质灾害预警信息列表
  getTodayList(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/disaster/getTodayList`,
      params
    })
  }
}
export default new Api()
